JavaScript A Beginners Guide 4E by John Pollock
Author:John Pollock
Language: eng
Format: epub, pdf
Tags: -
Publisher: McGraw-Hill Education
Published: 2013-03-20T04:00:00+00:00
Simple Event Handling
So far, your scripts have simply run during the loading (or reloading) of the Web page. This is good for a number of tasks, but many, such as node and style changes, would be more useful if they were executed in response to an action taken by the user. For instance, changing the background color of an element while the page is loading may not even be noticed by the viewer, but changing the color in response to a mouse click would allow the viewer to see the change and provide the choice of leaving the original color or changing to the new color via a click.
The click Event
The click event is available for most elements within the DOM. This event is triggered when the user clicks the primary mouse button while the mouse pointer is over a specific element. One way to gain control of the click event is through onclick, as shown in the following code (other methods will be covered in the next chapter):
Download
JavaScript A Beginners Guide 4E by John Pollock.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Mikado Method by Ola Ellnestam Daniel Brolund(26289)
Hello! Python by Anthony Briggs(25214)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(24445)
Kotlin in Action by Dmitry Jemerov(23533)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(22877)
Dependency Injection in .NET by Mark Seemann(22666)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(21430)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(20272)
Grails in Action by Glen Smith Peter Ledbrook(19342)
Adobe Camera Raw For Digital Photographers Only by Rob Sheppard(17054)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(16365)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(14077)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(12254)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(11532)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10643)
Hit Refresh by Satya Nadella(9219)
The Kubernetes Operator Framework Book by Michael Dame(8579)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8432)
Robo-Advisor with Python by Aki Ranin(8376)